import 'package:flutter_homemonitor/generated/json/base/json_field.dart';
import 'package:flutter_homemonitor/generated/json/detect_item_entity.g.dart';
import 'dart:convert';
export 'package:flutter_homemonitor/generated/json/detect_item_entity.g.dart';

List<DetectItemEntity> getDetectItemEntityList(List<dynamic> list) {
  List<DetectItemEntity> result = [];
  list.forEach((item) {
    result.add(DetectItemEntity.fromJson(item));
  });
  return result;
}

@JsonSerializable()
class DetectItemEntity {
  @JSONField(name: "ItemCode")
  late String itemCode;
  @JSONField(name: "ItemName")
  late String itemName;
  @JSONField(name: "City")
  late String city;
  @JSONField(name: "District")
  late String district;
  @JSONField(name: "CreateTime")
  late String createTime;
  @JSONField(name: "UpdateTime")
  late String updateTime;
  @JSONField(name: "Memo")
  late String memo;
  @JSONField(name: "ItemStats")
  late String itemStats;
  @JSONField(name: "ProjectManagerID")
  late double projectManagerID;
  @JSONField(name: "ReportNumber")
  late String reportNumber;
  @JSONField(name: "InspectionType")
  late String inspectionType;
  @JSONField(name: "Address")
  late String address;
  @JSONField(name: "Implementation")
  late String implementation;
  @JSONField(name: "Progress")
  late String progress;
  @JSONField(name: "ContractId")
  late double contractId;
  @JSONField(name: "Analysis")
  dynamic analysis;
  @JSONField(name: "InTime")
  late String inTime;
  @JSONField(name: "EditAssociatedData")
  late String editAssociatedData;
  @JSONField(name: "WGS84X")
  late double wGS84X;
  @JSONField(name: "WGS84Y")
  late double wGS84Y;
  @JSONField(name: "BuildingList")
  late List<dynamic> buildingList;
  @JSONField(name: "ProjectManager")
  late DetectItemProjectManager projectManager;
  @JSONField(name: "Id")
  late double id;

  DetectItemEntity();

  factory DetectItemEntity.fromJson(Map<String, dynamic> json) =>
      $DetectItemEntityFromJson(json);

  Map<String, dynamic> toJson() => $DetectItemEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManager {
  @JSONField(name: "UserCode")
  late String userCode;
  @JSONField(name: "UserName")
  late String userName;
  @JSONField(name: "UserPassWord")
  late String userPassWord;
  @JSONField(name: "TEL")
  dynamic tEL;
  @JSONField(name: "OperateType")
  dynamic operateType;
  @JSONField(name: "Memo")
  dynamic memo;
  @JSONField(name: "Search_SelfInput")
  late String searchSelfinput;
  @JSONField(name: "Search_All")
  late String searchAll;
  @JSONField(name: "Search_ParameterSet")
  late String searchParameterset;
  @JSONField(name: "Edit_SelfInput")
  late String editSelfinput;
  @JSONField(name: "Edit_All")
  late String editAll;
  @JSONField(name: "Edit_UserInput")
  late String editUserinput;
  @JSONField(name: "Edit_UserPermissions")
  late String editUserpermissions;
  @JSONField(name: "Edit_ProjectInput")
  late String editProjectinput;
  @JSONField(name: "Edit_ParameterSet")
  late String editParameterset;
  @JSONField(name: "company_id")
  late double companyId;
  @JSONField(name: "office_id")
  late double officeId;
  late String photo;
  @JSONField(name: "login_ip")
  dynamic loginIp;
  @JSONField(name: "login_date")
  dynamic loginDate;
  @JSONField(name: "login_flag")
  late String loginFlag;
  dynamic remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  dynamic qrcode;
  @JSONField(name: "IMEI")
  late String iMEI;
  late DetectItemProjectManagerCompany company;
  late DetectItemProjectManagerOffice office;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManager();

  factory DetectItemProjectManager.fromJson(Map<String, dynamic> json) =>
      $DetectItemProjectManagerFromJson(json);

  Map<String, dynamic> toJson() => $DetectItemProjectManagerToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerCompany {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  dynamic parentIds;
  late String name;
  late double sort;
  @JSONField(name: "area_id")
  late String areaId;
  late String code;
  late String type;
  late String grade;
  dynamic address;
  @JSONField(name: "zip_code")
  dynamic zipCode;
  dynamic master;
  dynamic phone;
  dynamic fax;
  dynamic email;
  @JSONField(name: "USEABLE")
  late String uSEABLE;
  @JSONField(name: "PRIMARY_PERSON")
  late double primaryPerson;
  @JSONField(name: "DEPUTY_PERSON")
  late double deputyPerson;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  dynamic remarks;
  @JSONField(name: "FromCompany")
  late double fromCompany;
  @JSONField(name: "FromOffice")
  dynamic fromOffice;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerCompanyArea area;
  @JSONField(name: "ParentOffice")
  dynamic parentOffice;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerCompany();

  factory DetectItemProjectManagerCompany.fromJson(Map<String, dynamic> json) =>
      $DetectItemProjectManagerCompanyFromJson(json);

  Map<String, dynamic> toJson() => $DetectItemProjectManagerCompanyToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerCompanyArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  late String parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  late String remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerCompanyAreaParentArea parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerCompanyArea();

  factory DetectItemProjectManagerCompanyArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerCompanyAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerCompanyAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerCompanyAreaParentArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  dynamic parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  late String remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerCompanyAreaParentAreaParentArea parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerCompanyAreaParentArea();

  factory DetectItemProjectManagerCompanyAreaParentArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerCompanyAreaParentAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerCompanyAreaParentAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerCompanyAreaParentAreaParentArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  late String parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  dynamic remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  dynamic parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerCompanyAreaParentAreaParentArea();

  factory DetectItemProjectManagerCompanyAreaParentAreaParentArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerCompanyAreaParentAreaParentAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerCompanyAreaParentAreaParentAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOffice {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  dynamic parentIds;
  late String name;
  late double sort;
  @JSONField(name: "area_id")
  late String areaId;
  late String code;
  late String type;
  late String grade;
  dynamic address;
  @JSONField(name: "zip_code")
  dynamic zipCode;
  dynamic master;
  dynamic phone;
  dynamic fax;
  dynamic email;
  @JSONField(name: "USEABLE")
  late String uSEABLE;
  @JSONField(name: "PRIMARY_PERSON")
  late double primaryPerson;
  @JSONField(name: "DEPUTY_PERSON")
  late double deputyPerson;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  dynamic remarks;
  @JSONField(name: "FromCompany")
  dynamic fromCompany;
  @JSONField(name: "FromOffice")
  late double fromOffice;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerOfficeArea area;
  @JSONField(name: "ParentOffice")
  late DetectItemProjectManagerOfficeParentOffice parentOffice;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOffice();

  factory DetectItemProjectManagerOffice.fromJson(Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeFromJson(json);

  Map<String, dynamic> toJson() => $DetectItemProjectManagerOfficeToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOfficeArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  late String parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  late String remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerOfficeAreaParentArea parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOfficeArea();

  factory DetectItemProjectManagerOfficeArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerOfficeAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOfficeAreaParentArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  dynamic parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  late String remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerOfficeAreaParentAreaParentArea parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOfficeAreaParentArea();

  factory DetectItemProjectManagerOfficeAreaParentArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeAreaParentAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerOfficeAreaParentAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOfficeAreaParentAreaParentArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  late String parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  dynamic remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  dynamic parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOfficeAreaParentAreaParentArea();

  factory DetectItemProjectManagerOfficeAreaParentAreaParentArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeAreaParentAreaParentAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerOfficeAreaParentAreaParentAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOfficeParentOffice {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  dynamic parentIds;
  late String name;
  late double sort;
  @JSONField(name: "area_id")
  late String areaId;
  late String code;
  late String type;
  late String grade;
  dynamic address;
  @JSONField(name: "zip_code")
  dynamic zipCode;
  dynamic master;
  dynamic phone;
  dynamic fax;
  dynamic email;
  @JSONField(name: "USEABLE")
  late String uSEABLE;
  @JSONField(name: "PRIMARY_PERSON")
  late double primaryPerson;
  @JSONField(name: "DEPUTY_PERSON")
  late double deputyPerson;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  dynamic remarks;
  @JSONField(name: "FromCompany")
  late double fromCompany;
  @JSONField(name: "FromOffice")
  dynamic fromOffice;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerOfficeParentOfficeArea area;
  @JSONField(name: "ParentOffice")
  dynamic parentOffice;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOfficeParentOffice();

  factory DetectItemProjectManagerOfficeParentOffice.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeParentOfficeFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerOfficeParentOfficeToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOfficeParentOfficeArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  late String parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  late String remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerOfficeParentOfficeAreaParentArea parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOfficeParentOfficeArea();

  factory DetectItemProjectManagerOfficeParentOfficeArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeParentOfficeAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerOfficeParentOfficeAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOfficeParentOfficeAreaParentArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  dynamic parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  late String remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  late DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
      parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOfficeParentOfficeAreaParentArea();

  factory DetectItemProjectManagerOfficeParentOfficeAreaParentArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaFromJson(json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea {
  @JSONField(name: "parent_id")
  late double parentId;
  @JSONField(name: "parent_ids")
  late String parentIds;
  late String name;
  late double sort;
  late String code;
  late String type;
  @JSONField(name: "create_by")
  late double createBy;
  @JSONField(name: "create_date")
  late String createDate;
  @JSONField(name: "update_by")
  late double updateBy;
  @JSONField(name: "update_date")
  late String updateDate;
  dynamic remarks;
  @JSONField(name: "del_flag")
  late bool delFlag;
  dynamic parentArea;
  @JSONField(name: "Id")
  late double id;

  DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea();

  factory DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.fromJson(
          Map<String, dynamic> json) =>
      $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentAreaFromJson(
          json);

  Map<String, dynamic> toJson() =>
      $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentAreaToJson(
          this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
